home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / vis082s.arc / VISION.PAS < prev    next >
Pascal/Delphi Source File  |  1991-04-17  |  4KB  |  128 lines

  1. {$R-,S-,I-,D-,F+,V-,B-,N-,L+,O+}
  2. {$M 63000,4800,28000}
  3. {$DEFINE Overlays}
  4.  
  5. { ViSiON BBS Software Written by Crimson Blade & The Elemental }
  6. { Compiled under Turbo Pascal v6.0 }
  7. { The BEST Kick-Ass software in the business!!! }
  8.  
  9.  
  10. Uses
  11.   Crt,       { Turbo Pascal CRT library }
  12.   Dos,       { Turbo Pascal DOS library }
  13.   Printer,   { Turbo Pascal Printer library }
  14.   Overlay,   { Sets up the files to be put in the overlay file. }
  15.   OvrCall,   { Calls the overlay files }
  16.   gentypes,  { All type and constant declarations }
  17.   configrt,  { Configuration declarations / procedures }
  18.   modem,     { Modem support }
  19.   statret,   { System status declarations / procedures }
  20.   gensubs,   { General subroutines: lowest level }
  21.   subs1,     { First subroutine library }
  22.   windows,   { Routines to manage the split screen }
  23.   subs2,     { Second subroutine library: higer level I/O }
  24.   textret,   { Message base routines }
  25.   mailret,   { E-mail routines }
  26.   userret,   { User routines }
  27.   flags,     { Board access flag routines }
  28.   mainr1,    { High-level routines, set one }
  29.   ansiedit,  { Full-screen editor }
  30.   lineedit,  { Line editor }
  31.   chatstuf,  { Chat mode routines }
  32.   mainr2,    { High-level routines, set two }
  33.   overret1,  { High-level routines, set three }
  34.   Bulletin,  {        Bulletin section }
  35.   Configur,  {   Configuration section }
  36.   Database,  {        Database section }
  37.   Doors,     {            Door section }
  38.   Email,     { Electronic mail section }
  39.   Filexfer,  {   File transfer section }
  40.   Voting,    {          Voting section }
  41.   Mycomman,  { Generic Shell Routines  }
  42.   MainMenu,  { Main menu commands      }
  43.   Main,      { Main menu shell         }
  44.   Waitcall,  { Waiting for calls       }
  45.   Getlogin,  { Log-in procedure        }
  46.   Init,      { Initialization routines }
  47.   Others,    { Other Routines (Overlayed), i.e. user routines }
  48.   Subs3,     { Low Level routines #3 used in filexfer. }
  49.   ExecSwap,  { Maximum Dos Shell Routines }
  50.   Fossil;
  51.  
  52. {$IFDEF Overlays}
  53. {$O Email}
  54. {$O Init}
  55. {$O Getlogin}
  56. {$O Configur}
  57. {$O Database}
  58. {$O Doors}
  59. {$O Voting}
  60. {$O Mycomman}
  61. {$O Filexfer}
  62. {$O Waitcall}
  63. {$O Bulletin}
  64. {$O Lineedit}
  65. {$O Ansiedit}
  66. {$O Mailret}
  67. {$O Menus}
  68. {$O PCBoard}
  69. {$O Others}
  70. {$ENDIF}
  71.  
  72.  
  73.  (* {}{}{}         ViSiON BBS Systems Main Program              {}{}{} *)
  74.  
  75.  
  76. var gotoforumterm:boolean;
  77. begin
  78.   readconfig;
  79. { initializeasync; }  { SHIT STUFF! }
  80.   UseEmsIfAvailable:=True;
  81.   If Not InitExecSwap(HeapPtr,'SWAP.$$$') Then Begin
  82.     WriteLn('Unable to allocate Swap Space!');
  83.     Delay(1500);
  84.   End;
  85.   If Not Install_FOSSIL (ConfigSet.UseCo) Then Begin
  86.     Writeln (#13#10'ERROR: There is no Fossil Driver Resident in Memory.');
  87.     Halt (4);
  88.   End;
  89.   local:=FALSE;
  90.   checkbreak:=false;
  91.   validconfiguration;
  92.   initforum(true);
  93.   fromdoor:=paramcount>=3;
  94.   repeat
  95.     gotoforumterm:=false;
  96.     returnfromdoor;
  97.     if not fromdoor then begin
  98.       gotoforumterm:=waitforacall;
  99.        getloginproc
  100.     end;
  101.         if not gotoforumterm then begin
  102.             newmailre;
  103.             if not fromdoor then if tonext>-1 then begin
  104.                 WriteHdr('Message from Last User');
  105.                 PrintText(tonext);
  106.             if sysopisavail then writehdr(configset.sysopi) else writehdr(configset.sysopo);
  107.       end;
  108.       votingbooth (true);
  109.       mainmenuproc;
  110.       writeln(direct,#27,'[0m');
  111.       fromdoor:=false;
  112.       if not disconnected then disconnect;
  113.       ensureclosed;
  114.       clrscr;
  115.       dontanswer;
  116.       if sysnext then
  117.          begin
  118.            closeport;
  119.            textmode(co80);
  120.            halt(4);
  121.          end;
  122.             initforum (false)
  123.     end
  124.     until not gotoforumterm;
  125.     closeport;
  126.     halt(0)
  127. end.
  128.